<?php
if(@$_POST['open'] != 'please'){
	exit;
}

include_once('../../php/include_all.php');
?>
<div class="row-fluid">
	<div class="box span12">
		<div class="box-header well"><i class="icon-home icon-large"></i>&nbsp; Master Gallery</div>
		<div class="box-content">
			<div class="control-group">
				<div class="controls">
					<button class="btn btn-primary buttonSimpan" type="button"><span id="loader" class="pull-left" ></span>&nbsp; Tambah</button>
				</div>
			</div>
			<table class="table table-hover table-bodered geo-table">
				<thead>
					<th>No.</th>
					<th>Nama Kegiatan</th>
					<th>Gambar</th>
					<th>Tanggal</th>
					<th>Keterangan</th>
					<th>Edit</th>
				</thead>
				<tbody id="tbody-gallery">
				<?php
					$no = 1;
					$data = get_datas("SELECT * FROM mus_galeri");
					foreach ($data as $data){
				?>
				<tr>
					<td><?php echo $no ?></td>
					<td><?php echo $data['nama_kegiatan'] ?></td>
					<td><?php echo $data['gambar'] ?></td>
					<td><?php echo $data['tanggal'] ?></td>
					<td><?php echo $data['keterangan'] ?></td>
					<td style="text-align:center;"><a class="btn btn-info btn-small bt-edit-gallery" name="<?php echo $data['id_galeri']; ?>"><i class="icon-edit icon-white"></i>&nbsp; Edit</a>
					<a class="btn btn-danger btn-small bt-delete-gallery" name="<?php echo $data['id_galeri']; ?>"><i class="icon-trash icon-white"></i>&nbsp; Delete</a></td>
				</tr>
				<?php
					$no++;
					}
				?>
				</tbody>
			</table>
		</div>
	</div>
</div>